package com.lms.dao.root;

import com.lms.bean.Role;
import com.lms.bean.Root;
import com.lms.bean.User;
import com.lms.bean.UserApply;
import com.lms.pojo.RootUserApplyData;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface RootDao {
    /*获取角色列表*/
    Root getLoginRoot(Connection connection,String rootCode);
    /*修改管理员密码*/
    int updatePwd(Connection connection,String id,String pwd)throws SQLException;
    /*获取用户账号*/
    List<User> getUserAccountList(Connection connection,String userCode,String role) throws SQLException;
    /*获取UserApplyData*/
    List<UserApply> getUserApplyList(Connection connection) throws SQLException;
    /*获取RootUserApplyData*/
    List<RootUserApplyData> getRootUserApplyDataList(Connection connection) throws SQLException;
    /*设置Open*/
    int setOpenState(Connection connection, String labCode,String week, String interval, String state) throws SQLException;
    /*取消申请*/
    int refuse(Connection connection,String rootID,String applyID) throws SQLException;
    /*统一申请*/
    int agree(Connection connection,String rootID,String applyID) throws SQLException;
    /*修改密码*/
    int reset(Connection connection,String userCode) throws SQLException;
    /*删除用户*/
    int delete(Connection connection,String userCode) throws SQLException;
    /*设置留言*/
    int setRootMsg(Connection connection,String userCode,String rootMsg) throws SQLException;
    /*获取顶级管理员openID*/
    String getRootOpenID(Connection connection)throws SQLException;
}
